﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Sword.Data;

namespace Sword.ProxyCore.CmdExecute
{
    public class UrlProcess
    {
        public ResultEnumType Type
        {
            get { return ResultEnumType.Url; }
        }

        public void Execute(Fiddler.Session oSession, ConditionItem rule)
        {
			// Prevent this request from going through an upstream proxy
			oSession.bypassGateway = true;
			// DNS name or IP address of target server
			oSession["x-overrideHost"] = rule.ActualResult;
		}
    }
}
